package yt.kpool.adapter;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.support.annotation.Nullable;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import java.util.List;
import yt.kpool.R;
import yt.kpool.activity.setting.PaySetDetailAc;
import yt.kpool.bean.ChildAccountBean;


public class PaySetAdapter extends BaseQuickAdapter<ChildAccountBean.DataBean, BaseViewHolder> {
    private Context context;
    public PaySetAdapter(Context context,@Nullable List<ChildAccountBean.DataBean> data) {
        super(R.layout.item_payset, data);
        this.context=context;

    }

    @Override
    protected void convert(BaseViewHolder helper, final ChildAccountBean.DataBean item) {

        helper.setText(R.id.tv_name,item.getChildAccountName());

        helper.getConvertView().setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                PaySetDetailAc.start((Activity) context,""+item.getChildAccountId(),item.getChildAccountName());

            }
        });
    }
}
